package com.cloud.photo.album.biz.service.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.cloud.photo.album.biz.service.UserService;
import com.cloud.photo.album.model.dbobject.UserInfo;
import com.cloud.photo.album.model.dbobject.UserLogin;
import com.cloud.photo.album.persist.dao.UserInfoDao;
import com.cloud.photo.album.persist.dao.UserLoginDao;

public class UserServiceImpl implements UserService {

	@Autowired
	private UserLoginDao userLoginDao;
	
	@Autowired
	private UserInfoDao userInfoDao;
	
	@Override
	public boolean emailExist(String userEmail) {
		return userLoginDao.mailExist(userEmail);
	}

	@Override
	public boolean userLogin(UserLogin userLogin) {
		return userLoginDao.userLogin(userLogin);
	}

	@Override
	public boolean userLoginRegist(UserLogin userLogin) {
		return userLoginDao.insertUserLogin(userLogin);
	}

	@Override
	public boolean userInfoRegist(UserInfo userInfo) {
		return userInfoDao.userInfoRegister(userInfo);
	}

}
